'use strict';
(function() {

    //app定义
    ngApp = angular.module('ngApp', ['ui.router']);


    //注册路由
    ngApp.config(['$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) {

        $urlRouterProvider.when("", "/home");
        $urlRouterProvider.when("/", "/home");

        $stateProvider.state("home", {url: "/home", templateUrl : "home/view/home.html"});
        $stateProvider.state("login", {url: "/login", templateUrl : "login/view/login.html", controller: "loginController"});
        $stateProvider.state("register", {url: "/register", templateUrl : "register/view/register.html", controller: "registerController"});
        $stateProvider.state("home.userlog", {url: "/userlog", templateUrl : "userlog/view/userlog.html"});
        $stateProvider.state("home.syslog", {url: "/syslog", templateUrl : "home/modules/syslog/view/syslog.html"});

    }]);

})();